<head><%= stylesheet_link_tag 'scaffolds' %></head>

<body><center>
<p id="notice"><%= notice %></p>

<table><tr>
<td><p>
  <b>Course:</b>
  <%= @session.course %>
</p></td>

<td><p>
  <b>Professor:</b>
  <%= @session.professor %>
</p></td>

<td>
  <b>Info:</b>
  <%= @session.info %></td>
</tr></table><br />

<h2>Currently Joined</h2>
<table>
<% @session.comments.each do |comment| %>
    <tr><td><b>Student:</b>
    <%= comment.commenter %></td>
	<td>
    <b>Study Topics:</b>
    <%= comment.body %></td>
    <td>
    <%= link_to 'Delete RSVP', [comment.session, comment],
               :confirm => 'Are you sure?',
               :method => :delete %>
<% end %></td></tr></table><br /><br />

<h2>Join</h2>
<%= form_for([@session, @session.comments.build]) do |f| %>
  <div class="field">
    <%= f.label :commenter, 'Name' %><br />
    <%= f.text_field :commenter %>
  </div>
  <div class="field">
    <%= f.label :body, 'Topics for Study' %><br />
    <%= f.text_area :body %>
  </div>
  <div class="actions">
    <%= f.submit 'Join Session' %>
  </div>
<% end %>

<!-- <%= link_to 'Edit', edit_session_path(@session) %> | -->
<%= link_to 'Done', sessions_path %><br /><br />

Powered by<br />
<img src="http://www.cip.gatech.edu/system/files/gtmob_logo.png" />
</center></body>